
VM_NAME=$1

usage()
{
  echo "delete.sh <vm_name>"
  exit 1
}

if [ -z "${VM_NAME}" ]; then
  usage
fi

sudo virsh destroy ${VM_NAME}
sudo virsh undefine ${VM_NAME}
echo "${VM_NAME} deleted."
